<template>
  <div id="confirm-modal">
    <a-modal v-model:open="open" :closable="false" centered>
      <div class="content">
        <img src="../../assets/img/join/success.png" alt="" />
        <p class="p1">{{ map[key].p1 }}</p>
        <p class="p2">投递日期：{{ resumeInfo.resumesTime }}</p>
        <p class="p3">
          {{ map[key].p3 }}
        </p>
      </div>
      <template #footer>
        <div class="btns">
          <a-button key="submit" type="primary" @click="handleOk">我知道了</a-button>
        </div>
      </template>
    </a-modal>
  </div>
</template>

<script setup lang="ts">

const router = useRouter()
const props = defineProps(['identifier']);

const key = props.identifier as string;
const open = ref<boolean>(false);
import { useStore } from '@/store';
const store = useStore();
const { resumeInfo } = store as any;
const handleOk = () => {
  open.value = false;
  router.push("/")
};
const show = () => {
  open.value = true;
};

defineExpose({
  show,
});

const map = ref<any>({
  train: {
    p1: '已完成简历投递',
    p3: '每人仅允许投递一次简历，提交成功后不支持再次投递。若遇特殊情况，可发送邮件到ftzhaopin@fangtian.me邮箱说明。',
  },
  contract: {
    p1: '已完成志愿选择',
    p3: '每人仅允许填写一次志愿，请根据实际情况填写，提交成功后无法自助修改。如有特殊情况请及时与对应HR沟通。',
  },
});
</script>

<style lang="scss" scoped>
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btns {
  display: flex;
  justify-content: center;
}

img {
  width: 160px;
}

.p1 {
  font-weight: 500;
  font-size: 21px;
  color: #333333;
  line-height: 25px;
  text-align: center;
  font-style: normal;
  text-transform: none;
  margin: 20px 0;
}

.p2 {
  font-weight: 400;
  font-size: 16px;
  color: #333333;
  line-height: 19px;
  text-align: center;
  font-style: normal;
  text-transform: none;
  margin-bottom: 27px;
}

.p3 {
  font-family: PingFang SC, PingFang SC;
  font-weight: 400;
  font-size: 13px;
  color: #b3c0c8;
  line-height: 26px;
  text-align: center;
  font-style: normal;
  text-transform: none;
}
</style>
